package com.yoomiito.app.widget.dialog;

import android.content.Context;
import android.graphics.Color;
import android.graphics.PorterDuff;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.widget.ContentLoadingProgressBar;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;

import com.yoomiito.app.R;

public class LoadDialog  extends BaseDialog {
    public LoadDialog(@NonNull Context context) {
        this(context,0);
    }

    public LoadDialog(@NonNull Context context, int themeResId) {
        super(context, R.style.dialog_1);
    }

    protected LoadDialog(@NonNull Context context, boolean cancelable, @Nullable OnCancelListener cancelListener) {
        super(context, cancelable, cancelListener);
    }

    @Override
    public View setView() {
        View view = LayoutInflater.from(mContext).inflate(R.layout.dialog_load,null,false);
        ContentLoadingProgressBar progressBar = view.findViewById(R.id.dialog_load_pb);
        progressBar.getIndeterminateDrawable().setColorFilter(Color.WHITE, PorterDuff.Mode.MULTIPLY);
        setmGravity(Gravity.CENTER);
        setWrapContent();
        return view;
    }

    @Override
    public void onBackPressed() {
    }
}
